package com.light.gamecomponents.physics;
import java.util.ArrayList;

import com.badlogic.gdx.physics.box2d.Contact;
import com.badlogic.gdx.physics.box2d.ContactListener;

public class RollerContactListener implements ContactListener{
	
	private ArrayList<ContactListener> m_contactListenerList = new ArrayList<ContactListener>();
	
	@Override
	public void beginContact(Contact contact) {
		for (int i = 0; i < m_contactListenerList.size(); i++)	
			m_contactListenerList.get(i).beginContact(contact);
		
	}

	@Override
	public void endContact(Contact contact) {
		for (int i = 0; i < m_contactListenerList.size(); i++)
			m_contactListenerList.get(i).endContact(contact);
	}
	
	public void add(ContactListener CL) { m_contactListenerList.add(CL); }
	public void remove(ContactListener CL) { m_contactListenerList.remove(CL); }

}
